package com.v9.system.config;

import org.springdoc.core.GroupedOpenApi;
import org.springdoc.core.customizers.OpenApiCustomiser;
import org.springdoc.core.customizers.OperationCustomizer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

@Configuration
public class ApiConfig {
    @Resource
    private OpenApiCustomiser openApiCustomiser;
    @Resource
    private OperationCustomizer operationCustomizer;

    @Bean
    public GroupedOpenApi flowOpenApi() {
        String packagesToscan[] = {"com.v9"};
        return GroupedOpenApi.builder().group("system").packagesToScan(packagesToscan).addOperationCustomizer(operationCustomizer).addOpenApiCustomiser(openApiCustomiser)
                .build();
    }
}
